package com.springboot.demo.common.exception;

/**
 * @author Juochiu
 * @date 2017/8/31.
 */
public class BusinessException extends RuntimeException {
	
    private Integer code = 400;

    private Object params;

    public BusinessException(String message) {
        super(message);
    }

    public BusinessException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public Object getParams() {
		return params;
	}

	public void setParams(Object params) {
		this.params = params;
	}

	public BusinessException(String message, Throwable cause, Integer code) {
        super(message, cause);
        this.code = code;
    }
	
	public BusinessException(String message, Throwable cause, Integer code,Object params) {
        super(message, cause);
        this.code = code;
        this.params = params;
    }
    
    public BusinessException(String message,Object params) {
        super(message);
        this.params = params;
    }
}
